package cn.wen233.srpc.basic.rollback;

import cn.wen233.srpc.basic.exception.BaseException;
import lombok.extern.slf4j.Slf4j;

/**
 * @author wenjie
 * @date 2022-03-21 17:22
 */
@Slf4j
public class DefaultRollbackFactory implements RollbackFactory<Object> {
    @Override
    public Object create(Throwable throwable) {
        log.error("默认回滚",throwable);
        throw new BaseException(throwable);
    }
}
